import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:untitled/pages/HomeTop.dart';
import 'package:untitled/pages/NewsWidget.dart';
import 'package:untitled/pages/SwiperWidget.dart';
import 'package:untitled/pages/bottom_widget.dart';
import 'package:untitled/pages/brand_list_widget.dart';
import 'package:untitled/pages/charge_widget.dart';
import 'package:untitled/pages/mywidgets.dart';
import 'package:untitled/pages/service_widget.dart';
import 'package:untitled/pages/title_widget.dart';

class YHdemo extends StatefulWidget {
  const YHdemo({Key? key}) : super(key: key);

  @override
  State<YHdemo> createState() => _YHdemoState();
}

class _YHdemoState extends State<YHdemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: Icon(Icons.person,size: 35,),
        leadingWidth: 20.w,
        title:TitleWidget(),
        actions: [
          Image.asset(
            'assets/name.png',
            width: 30.w,
          ),
          SizedBox(width: 5.w),
          Image.asset(
            'assets/china.png',
            width: 30.w,
          ),
          SizedBox(width: 10.w)
        ],
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            HomeTop(),// 最上面的多个功能按钮
            NewsWidget(),// 新闻
            SwiperWidget(),// 轮播图
            subTitle01('城市精选'),
            Container(
              margin: EdgeInsets.all(10),
              height: 120,
              decoration: BoxDecoration(
                image: DecorationImage(image: AssetImage('assets/B1.jpg'),
                fit: BoxFit.fill,
                )
              ),
            ),
            subTitle02("民生演播庭", "无限精彩 尽等你来"),
            Container(
              margin: EdgeInsets.all(10),
              height: 120,
              decoration: BoxDecoration(
                image: DecorationImage(image: AssetImage('assets/B2.jpg'),
                fit: BoxFit.fill,
                )
              ),
            ),
            subTitle02("存款", "更多"),
            Container(
              margin: EdgeInsets.all(10),
              height: 150,
              decoration: BoxDecoration(
                image: DecorationImage(image: AssetImage('assets/B3.jpg'),
                fit: BoxFit.fill,
                )
              ),
            ),
           subTitle01('特色专区'),
           Container(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children:[
                feature(Color(0xffe4f0fe), '薪悦生活', '一见倾心共见未来', 'g1.png', '电子工资单', 'g2.png', '涨薪水'),
                SizedBox(width: 10.w,),
                feature(Color(0xfffef4e4), '薪悦生活', '一见倾心共见未来', 'g1.png', '电子工资单', 'g3.png', '涨薪水'),
              ]
            ),
           ),
           SizedBox(height: 10.h,),
           Container(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children:[
                feature(Color(0xffe4f0fe), '薪悦生活', '一见倾心共见未来', 'g1.png', '电子工资单', 'g2.png', '涨薪水'),
                SizedBox(width: 10.w,),
                feature(Color(0xfffef4e4), '薪悦生活', '一见倾心共见未来', 'g1.png', '电子工资单', 'g3.png', '涨薪水'),
              ]
            ),
           ),
           subTitle02('手机快充', '手机 水电燃气费'),
           ChargeWidget(),
           subTitle02('网点服务', '提前预约 省时省力'),
           ServiceWidget(),
           subTitle01('品牌专区'),
           BrandListWidget(),
           BottomWidget(),
           SizedBox(height: 30.h,)

          ], 

        ),
      ) ,
    );
    
  }
}